var commonService = {
  getImages: function(options) {
    var util = require('../utils/util.js');
    var that = this;
    var app = getApp();
    wx.request({
      url: app.getApiPathPrefix() + '/common/getImages',
      method: 'GET',
      data: util.signature({
          cityId: options.cityId,
          imgType: options.imgType
      }),
      header: util.buildRequestheader(),
      success: function (res, statusCode) {
        if (res.data.Success) {
          options.success.call(that, res.data.ResultData);
        } else {
          util.processFailureRequest(options.failure, res, statusCode);
        }
      },
      fail: function() {
        wx.showToast({
          title: '服务器忙，请稍后重试',
          icon: 'loading',
          duration: 2000
        });
      }
    });
  }
};

module.exports = {
  getImages: commonService.getImages
}